#include "stdafx.h"
#include "CsvFile.h"

#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif 

int CCsvFile::PraseString( const CString& strRecord, vector<CString>& vString, CString strSeparation /*= _T(",")*/ )
{
	vString.clear();
	CString strTemp(strRecord);
	int nPos=strTemp.Find(strSeparation);
	while(nPos != -1)
	{
		CString str;
		str = strTemp.Left(nPos);
		vString.push_back(str);
		strTemp.Delete(0, nPos+1);
		nPos = strTemp.Find(strSeparation);
	}
	vString.push_back(strTemp);
	return (int)vString.size();
}
